<template>
  <div class="app-telphone" >
    <a :href="telPhone" @click="telClick"><slot/></a>
  </div>
</template>
<script lang="ts">
import {
  Vue,
  Component,
  Prop
} from "vue-property-decorator";
@Component({
    components: {}
})
export default class AppTelPhone extends Vue {

  /**
   * 电话号码
   *
   * @type {string}
   * @memberof AppTelPhone
   */
  @Prop() public value!: string;

  /**
   * 点击事件（阻止冒泡）
   *
   * @type {string}
   * @memberof AppTelPhone
   */
  public telClick(e: Event) {
    e.stopPropagation();
  }

  get telPhone() {
    return `tel:${this.value}`;
  }

}
</script>
